Optical disk media typically comprise a continuous spiral groove which extends for the entire data storage capacity of the disk. CD-based (CD-R or DVD-R) optical disk media architecture utilizes the continuous spiral groove with sectors (also called "blocks") of equal length, which are accessed at a constant linear velocity (CLV). Thus, there are a greater number of sectors along the outer tracks of the spiral than at the inner tracks of the spiral.
Herein, the terms "block" and "sector" are used interchangeably.
The CD-R (CD-recordable) optical disk media is CD-based and comprises a continuous spiral CLV media. The coding modulation for CD-R is called "EFM", which means eight-to-fourteen modulation. The encoding turns the input data, along with error correction data, address information, synchronization patterns, and other miscellaneous content, into an encoded binary stream of bits, expanding every eight bits of input data into fourteen, with an additional three bits to separate words, as is well known in the art. In the CD-R format, 24 of the resultant 17 bit symbols are assembled into a frame. 98 frames are grouped together to form a sector. A layered level of error correction is accomplished on a "diamond" or combined lateral and slant pattern across the frames to avoid the total loss of a frame of data, as is known in the art. Thus, each sector comprises a totality of 98 frames of data, together with a sector header, synch information and layered ECC distributed across the frames and sectors. The CD-R media does not provide molded sector or block identification marks to identify data recording positions. The sectors are therefore formatted with headers having a great deal of information to aid in synchronizing the rotation of the disk and obtaining data framing, comprising a great deal of overhead. A limited number of entries may be placed in the table of contents on the disk for locating the beginning of recorded areas. Therefore, it is very important for CD-R to not interrupt the data writing process because of this overhead penalty.
Current CD-R devices therefore have a buffer to accumulate the input data to organize the data into sectors for writing on the disk in a continuous sequence of sectors.
When the current buffer of a CD-R device fails to receive input data from the host on a timely basis (due to higher priority tasks or interrupts using host resources), the buffer may under-run and will become empty, causing the writing process to be halted in an orderly fashion, resulting in a data file being partially written. One proposed solution, which is undesirable, is to stop writing sectors upon the occurrence of the under-run. This is because in CD-R devices, it is not possible to restart the writing process without incurring the space and table of contents overhead, and it results in a disk having the appearance of two recorded files. Most often, the user application cannot deal with the complexity or with the two data files where one is expected, so the disk is considered ruined and discarded.
What is needed is a means for protecting the recording of the optical disk against under-run of the input data to the buffer.